package Java攻略._3_流式操作._1_流的创建;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class _6_从集合创建流 {

    public static void main(String[] args) {

        List<String> stringList = Arrays.asList("Greg", "Marcia", "Peter", "Jan",
                "Bobby", "Cindy");

        String names = stringList.stream()
                .collect(Collectors.joining(", "));

        System.out.println(names);
    }
}
